Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@emotion/eslint-plugin
Advanced tools
ESLint rules for emotion
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install @emotion/eslint-plugin
:
$ npm install @emotion/eslint-plugin --save-dev
Note: If you installed ESLint globally (using the -g
flag) then you must also install @emotion/eslint-plugin
globally.
Add @emotion
to the plugins section of your .eslintrc
configuration file. You can omit /eslint-plugin
:
{
"plugins": ["@emotion"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"@emotion/jsx-import": "error"
}
}
The Emotion 11 codemods are contained in this package. To use them, enable the rule shown below.
{
"rules": {
"@emotion/pkg-renaming": "error"
}
}
The Emotion 10 codemods are contained in this package. To use them, enable the rules shown below. Keeping these rules after migrating is also useful to have jsx
from @emotion/react
automatically imported when the css prop is used and other such things. You may also want to not enable certain rules while you are migrating or forever, such the no-vanilla
rule.
{
"rules": {
"@emotion/jsx-import": "error",
"@emotion/no-vanilla": "error",
"@emotion/import-from-emotion": "error",
"@emotion/styled-import": "error"
}
}
Note:
These rules assume you are using React, if you are not using React, you should keep using the
emotion
package.
FAQs
ESLint rules for emotion
The npm package @emotion/eslint-plugin receives a total of 182,615 weekly downloads. As such, @emotion/eslint-plugin popularity was classified as popular.
We found that @emotion/eslint-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.